Fix relative index URLs - #230
Conversation
for more information, see https://pre-commit.ci
agriyakhetarpal
left a comment
There was a problem hiding this comment.
Thanks, @juntyr! Would it be possible for you to add a test?
There was a problem hiding this comment.
Hi, sorry for the late review.
Anaconda package index requires the previous behavior.
The index URL is:
and the relative URL in the response is
/pyodide/simple/zstandard/0.22.0/zstandard-0.22.0-cp312-cp312-pyodide_2024_0_wasm32.whl
So we needed to strip out the path part of the index URL (/pyodide/simple/) and append the relative URL.
Maybe there is some other package index which have different behavior? Could you please tell us which package index you are having an issue?
|
This is for the index I host together with my custom Pyodide deployment. The index lists all packages that were built just for Pyodide. Each version of the lab has its own index, so e.g. there is
When navigating the links in the web browser, everything works, so the relative links seem to be correctly set up. From my understanding, the simple HTML index supports relative URLs with the same meaning as when using a web browser. I could of course switch to absolute URLs but don't really want to bake in the full URL since it would directly tie everything to where the lab is currently being hosted. |
|
I see. Thanks. So, if the relative URL starts with It looks like |
|
Oh, okay, looks like it is already fixed in #174. I think we can merge this then. Thanks! |
Fixes #229